package cn.mugutu.finance.query;

import cn.mugutu.finance.domain.system.Department;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
public class DepartmentQuery extends BaseQuery {

    private String name;

    public DepartmentQuery() {
        super(Department.class);
    }

    @Override
    public void addWhere() {
        if (StringUtils.isNotBlank(name)) {
            addWhere(" o.name like ? ", "%" + name + "%");
        }
    }

}
